/*
 * RTMLHelper.java is part of htn-iface.
 *
 * RTMLHelper.java is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * RTMLHelper.java is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with RTMLHelper.java.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.htn.rtml;

import java.util.Set;

import org.joda.time.DateTime;

/**
 * 
 * @param <T> type of RTML representation
 */
public interface RTMLHelper<T> {

	/**
	 * xpath: //RTML/@mode
	 * @param rtml
	 * @return
	 */
	RTMLMode getMode(T rtml);
	
	/**
	 * xpath: //RTML/@expires
	 * @param rtml
	 * @return
	 */
	DateTime getExpires(T rtml);
	
	/**
	 * restricted to "rtml://+"
	 * xpath: //RTML/@uid
	 * @param rtml
	 * @return
	 */
	String getRTMLUid(T rtml);
	
	/**
	 * xpath: //RTML/Schedule/Observation/@id
	 * @param rtml
	 * @return
	 */
	Set<String> getObservationIdSet(T rtml);
	
	/**
	 * xpath: //RTML/RespondTo (xs:token)
	 * @param rtml
	 * @return
	 */
	Set<String> getRespondToSet(T rtml);
	
}
